#include <cellcsp.h>
#include <string>
#include <stdio.h>
#include <csp_debug.h>
#include <vector>

//#define EXPECTED_RES (100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109)
#define EXPECTED_RES (109)

int main(){

	int res;

	char *n10_nested_processes = "./tasks/10_nested_processes_task";
	
	CSPConfig conf;

	conf.add_csp_program(n10_nested_processes ,"10_nested_processes_task");

	CellCSP_start(conf);

	printf("Running yield_test with file %s\n", n10_nested_processes);                  

	CSPProcess nested_tasks("10_nested_processes_task");

	res = nested_tasks.Run();

	CellCSP_end();

	ASSERT( EXPECTED_RES == res);

	printf("10_nested_processes_task terminated with value %i\n", res);
	
	return 0;
}
